<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>第一种，集成式：</div>
    <div id='box'></div>
    <script>
    let dom = document.getElementById('box')
    let header = document.createElement('div')
    header.innerText = '数据1'
    dom.append(header)

    let content = document.createElement('div')
    content.innerText = '数据2'
    dom.append(content)
    </script>
</body>
</html>